/* 
 * File:   TBBComput.h
 * Author: amouro-m
 *
 * Created on 31 mai 2010, 13:05
 */

#ifndef _TBBCOMPUT_H
#define	_TBBCOMPUT_H

#include "tbb/blocked_range2d.h"

#include "FractalPrinter.h"
#include "ResultPanel.h"
#include "Computable.h"
#include "Zone.h"

class TBBCompute
{
public:
    TBBCompute(Computable* computable, FractalPrinter* fp, ResultPanel* result_panel);
    virtual ~TBBCompute();

    Computable* get_computable() const;
    FractalPrinter* get_fractal_printer() const;

    virtual void operator() (const tbb::blocked_range2d<unsigned int, unsigned int> & r) const;

    static void compute(Computable* computable, FractalPrinter* fp, Zone* zone, ResultPanel* result_panel);

private:
    Computable*        _computable;
    FractalPrinter*    _fp;
    ResultPanel*       _result_panel;
};

#endif	/* _TBBCOMPUT_H */

